<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="fragments/easyui_insdep_head :: easyui_insdep_head" th:with="title='仓库信息修改'">
</head>

<body>
<div style="width: 400px; padding: 60px 90px;">
    <form id="ff" method="post"
          action="/ware/">
        <input type="hidden" name="_method" value="PUT" />
        <div style="margin-bottom: 20px">
            <input type="hidden"
                   th:value="${param.wareId == null ? '' : param.wareId[0]}" name="wareId"
                   id="wareId"/>
        </div>
        <div style="margin-bottom: 20px">
            <input class="easyui-textbox theme-textbox-radius " id="wareName"
                   name="wareName" th:value="${param.wareName == null ? '' : param.wareName[0]}"
                   style="width: 100%"
                   data-options="required:true, label:'名称:'"/>
        </div>
        <div style="margin-bottom: 20px">
            <input class="easyui-textbox theme-textbox-radius" id="wareDes" name="wareDes"
                   th:value="${param.wareDes == null ? '' : param.wareDes[0]}"
                   style="width: 100%;height: 60px"
                   data-options="label:'描述:' , multiline:true"/>
        </div>
        <div style="margin-bottom: 20px">
            <input class="easyui-textbox theme-textbox-radius" id="wareBarCode" name="wareBarCode"
                   th:value="${param.wareBarCode == null ? '' : param.wareBarCode[0]}"
                   style="width: 100%"
                   data-options="label:'条形码:' "/>
        </div>

        <div style="text-align:center;padding:5px">
            <a href="javascript:void(0)" class="easyui-linkbutton" style="width: 100%" onclick="submitForm()">提交更改</a>
        </div>
    </form>

</div>
<script type="text/javascript">
    //<![CDATA[
    $(function () {
        $('#ff').form({
            success: function (data) {     // 提交成功后的回调函数。
                data = data == "success" ? "修改成功" : "修改失败";
                $.messager.alert('结果', data, 'info');
            }
        });
    });

    function submitForm() {
        $("#ff").submit();
    }
    //]]>
</script>

</body>
</html>